<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>DRYCMS</title>
<link rel="stylesheet" href="/layuiadmin/layui/css/layui.css">
<link rel="stylesheet" href="/document/document.css">
<script src="/layuiadmin/layui/layui.js"></script>
<script src="/document/document.js"></script>
</head>
<body>
<span class="layui-breadcrumb" lay-separator="->">
    <a><cite>用户中心</cite></a>
    <a><cite>订单</cite></a>
    <a><cite>订单列表</cite></a>
</span>
<hr class="layui-bg-gray">
<table class="layui-table">
    <thead>
        <tr>
            <th>ID</th>
            <th>名称</th>
            <th>图片</th>
            <th>订单号</th>
            <th>金额</th>
            <th>订单时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr> 
    </thead>
    <tbody id="codeBox">
    </tbody>
</table>
<div class="dry-center" id="page"></div>
<script>
function makeUrl(page, limit)
{
    var data = {
        page: page,
        limit: limit,
        device: "html",
        token: getCookie("token")
    };
    return "/Api/Order/getList?" + httpBuildQuery(data);
}

layui.use(["jquery", "layer", "laypage", "laytpl", "table", "element"], function($, layer, laypage, laytpl, table, element){
    list(layui, "codeBox", "page", {{ count }}, 5, makeUrl, getOrderListCode());
    $("body").on("click", "a.download", function(e){
        var a = e.target;
        var url = $(a).attr("url");
        window.open(url);
    });
});
</script>
</body>
</html>